package com.qfedu.dao;

import com.qfedu.entity.Askforleave;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AskforleaveDao {

    @Insert("insert into t_askforleave values(#{id},#{uid},#{startTime},#{endTime},#{count},#{status},#{reason})")
    @Options(useGeneratedKeys = true,keyProperty = "id")
    int addAskforleave(Askforleave askforleave);

    @Select("select id,startTime,endTime,reason from t_askforleave")
    List<Askforleave > findAskforleave();
}
